package com.company.cloud.page.modules.api.fallback;

import com.company.cloud.common.bean.BaseClientResult;
import com.company.cloud.page.modules.api.models.WechatMomentsModel;
import com.company.cloud.page.modules.api.models.WechatMomentsSearch4PageModel;
import com.company.cloud.page.modules.api.models.WechatMomentsSearchModel;
import com.company.cloud.page.modules.api.request.PageUserCardAddByCompanyRequest;
import com.company.cloud.page.modules.api.response.PageCardConfigResponse;
import com.company.cloud.page.modules.api.response.WechatMomentsResponse;
import com.company.cloud.page.modules.api.service.PageClientService;
import feign.hystrix.FallbackFactory;
import lombok.extern.log4j.Log4j2;
import org.springframework.stereotype.Component;

import java.util.List;
import java.util.Map;
import java.util.Set;

@Log4j2
@Component
public class PageClientServiceFallbackFactory implements FallbackFactory<PageClientService>{

	@Override
	public PageClientService create(Throwable cause) {
		return new PageClientService() {
			@Override
			public BaseClientResult<List<WechatMomentsModel>> getWechatMoments2List(WechatMomentsSearchModel param) {
				return BaseClientResult.callbackError();
			}
			@Override
			public BaseClientResult<WechatMomentsResponse> getWechatMoments2Page(WechatMomentsSearch4PageModel param) {
				return BaseClientResult.callbackError();
			}

			@Override
			public BaseClientResult<PageCardConfigResponse> getPageCardConfig(String pageNo) {
				return BaseClientResult.callbackError();
			}

			@Override
			public BaseClientResult<Map<String, PageCardConfigResponse>> getPageCardConfigMap(Set<String> pageNo) {
				return BaseClientResult.callbackError();
			}

			@Override
			public BaseClientResult<PageCardConfigResponse> addUserPageCardByCompany(PageUserCardAddByCompanyRequest request) {
				return BaseClientResult.callbackError();
			}
		};
	}


}
